<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<body>
<h2>springmvc advance</h2>

<hr/>
<h3>传统文件上传</h3>
<form action="/upload/test1" method="post" enctype="multipart/form-data">
    选择文件：<input type="file" name="upload"/><br/>
    <input type="submit" value="上传"/>
</form>

<hr/>
<h3>springmvc文件上传</h3>
<form action="/upload/test2" method="post" enctype="multipart/form-data">
    <!-- multiple="multiple"可以同时上传多个文件(但后台要做相应处理,本案例没做) -->
    选择文件：<input type="file" name="upload" multiple="multiple"/><br/>
    <input type="submit" value="上传"/>
</form>

<hr/>
<h3>跨服务器文件上传</h3>
<form action="/upload/test3" method="post" enctype="multipart/form-data">
    选择文件：<input type="file" name="upload"/><br/>
    <input type="submit" value="上传"/>
</form>

<hr/>
<h3>文件下载测试</h3>
<!-- 注:首先在下载目录下准备一个1.jpg图片 -->
<a href="/download/test?filename=1.jpg">文件下载</a>

</body>
</html>
